<?
if(!isset($lock)){ 
    exit(); 
}
?>
<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>calc126</title>
    <link type="text/css" href="css/custom.css" rel="stylesheet" />	
    <script>
    function send_curl(){
        inp = document.getElementById('calcinput');
        $.ajax({
            type: 'POST',
            url: 'iface.php',
            data: ({ curl: inp.value, key: '<?php echo $_SESSION['key']; ?>' }),
            cache: false,
            success: function(html){
                inp.value = '';
                inp.value = html;
            }
        });
    }
    
    function send_soap(){
        inp = document.getElementById('calcinput');
        $.ajax({
            type: 'POST',
            url: 'iface.php',
            data: ({ soap: inp.value, key: '<?php echo $_SESSION['key']; ?>' }),
            cache: false,
            success: function(html){
                inp.value = '';
                inp.value = html;
            }
        });
    }
    </script>
  </head>
  <body><?php echo $menu; ?>
   <div id='history'></div>
    <table class='calc' onclick='clicked(event)'>
    <tr><td colspan='5'>
        <input name='calcmeplz' id='calcinput' type='text'>
        <input onClick='send_curl()' type='button' value='curl'>
        <input onClick='send_soap()' type='button' value='soap'>
    </td></tr>
    <tr><td class='calc'>7</td><td class='calc'>8</td><td class='calc'>9</td><td class='calc'>/</td><td class='calc'>cos</td></tr>
    <tr><td class='calc'>4</td><td class='calc'>5</td><td class='calc'>6</td><td class='calc'>×</td><td class='calc'>sin</td></tr>
    <tr><td class='calc'>1</td><td class='calc'>2</td><td class='calc'>3</td><td class='calc'>-</td><td class='calc'>&#8730;</td></tr>
    <tr><td class='calc'>0</td><td class='calc'>.</td><td class='calc'>C</td><td class='calc'>+</td><td class='calc'>log</td></tr>
    <tr><td class='calc' colspan='5'>Calculate</td></tr>
    </table>
    
  </body>

<!-- JS -->
<script src="js/jquery-1.5.2.min.js"></script>
<script src="js/calcevents.js"></script>

<script>
</script>
</html>
